home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
PRG
/
Fat Module folder.sit
/
Fat Module folder
/
Fat Module ƒ
/
Read Me
< prev
next >
Wrap
Text File
|
1995-09-26
|
2KB
|
65 lines
FAT MODULE
This Metrowerks C 1.2.2 project shows how to build a fat After Dark module.
BUILDING THE MODULE
1. Install ToolServer as described in the file "How to add Tools", which is in
CodeWarrior6:Metrowerks C/C++.
2. Make "Fat Module.オ".
3. Make "Fat Module PEF.オ"
4. Start ToolServer from the Tools menu of Metrowerks C/C++. Switch to ToolServer, and execute
"Fat Module TS". "Fat Module" now contains a safe fat code resource.
NOTES
If you change the module name, you need to make the change in "Fat Module.r" and "Fat Module TS"
as well as in the projects.
The setting "Expand Unitialized Data" is required in "Fat Module PEF.オ" when globals are used.
This does not seem to be mentioned in the CW documentation. I found it in Erik Walter's article
in CSMP, 1/5/95.
"Fat Module TS" must be executed from ToolServer itself, not from the ToolServer menu in
MetroWerks, or the directory will not be set correctly. This may be a problem with the
ToolServer installation - does anyone know?
I have modified GraphicsModule_main.c so that it supports Metrowerks globals, contains
prototypes, and a __procinfo variable in case you want to build a PPC-only module directly with
the Metrowerks linker. These changes are not necessary for building a fat resource.
No extra calls are required to use globals unless you write a callback function.
In that case, #include <SetUpA4.h> in your source file, call RememberA4() before your function
is executed, and bracket your function with:
long oldA4=SetUpA4();
...
RestoreA4(oldA4);
You must a also create universal procedure pointer for your callback function, e.g.:
UserItemUPP myItemProc=NewUserItemProc(myItem);
and later dispose of it:
DisposeRoutineDescriptor(myItemProc);
The same source, with the A4 and routine descriptor calls, will work for the 68K and PPC
version.
Robert Geisler, 8/20/95
E-mail: geisler@fserv1.mpib-tuebingen.mpg.de